package com.vnt;

import com.vnt.feign.DefaultFeignConfiguration;
import com.vnt.feign.client.UserClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableFeignClients(clients= UserClient.class,defaultConfiguration = DefaultFeignConfiguration.class)
@MapperScan("com.vnt.mapper")
public class OrderDemo {
    public static void main(String[] args) {
        SpringApplication.run(OrderDemo.class,args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
